package cn.codeforfun;

import org.apache.log4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by Administrator on 2016/12/26 0026.
 */
@SpringBootApplication
@Controller
public class Application {
    private static final Logger log = Logger.getLogger(Application.class);

    @RequestMapping
    @ResponseBody
    public String index() {
        log.debug("This is debug");
        log.info("This is info");
        log.error("This is error");
        return "Hello world!";
    }

    public static void main(String[] args) {
        SpringApplication.run(Application.class);
    }
}
